/*
 * @Author: 
 * @Date: 2024-08-15 17:18:08
 * @LastEditor: zhuxiaoyi
 * @LastEditTime: 2024-08-15 18:08:40
 * @Description: 
 */
import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn, Timestamp } from 'typeorm';

@Entity('TB_L3Pub_Product')
export class Product {

  @PrimaryGeneratedColumn({ type: 'bigint' })
  objid: number;

  @Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
  productTM: Timestamp;

  @Column({ type: 'int', nullable: true, default: 0 })
  productType: number;

  @Column({ type: 'int', nullable: true, default: 0 })
  productIndex: number;

  @Column({ type: 'varchar', length: 200, nullable: true })
  filePath: string;

  @Column({ type: 'varchar', length: 200, nullable: true })
  fileName: string;

  @Column({ type: 'varchar', length: 200, nullable: true })
  fileExt: string;

  @Column({ type: 'int', nullable: true, default: 0 })
  publish: number;

  @Column({ type: 'mediumtext', nullable: true })
  posJson: string;

  @Column({ type: 'mediumtext', nullable: true })
  stcJson: string;

  @Column({ type: 'varchar', length: 200, nullable: true })
  url: string;

  @Column({ type: 'int', nullable: true, default: 0 })
  urlStatus: number;

  @Column({ type: 'int', nullable: true, default: 0 })
  status: number;

  @Column({ type: 'varchar', length: 200, nullable: true })
  log: string;

  @Column({ name: 'create_time', type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
  createTime: Timestamp;
  
  @Column({ name: 'insert_time', type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
  insertTime: Timestamp;
  
  @Column({ name: 'update_time', type: 'timestamp', default: () => 'CURRENT_TIMESTAMP', onUpdate: 'CURRENT_TIMESTAMP' })
  updateTime: Timestamp;
  
  @Column({ name: 'delete_time', type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
  deleteTime: Timestamp;

}